package Common;

import java.io.Serializable;

/**
 * This class contains everything the server need in order to perform a request from the client
 * @author ori ziv
 *
 */
public class ServerRequest implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = -2295113218361171146L;
	private final SERVER_COMMANDS command;		// enum with the command enumerator
	private final String userID;				// id of the command source
	private Object entity;						// system entity to add, modify, etc'
	private String condition;					// search term for the server
	
	public ServerRequest(SERVER_COMMANDS command, String userID) {
		this.command = command;
		this.userID = userID;
	}

	public ServerRequest(SERVER_COMMANDS command, String userID, Object entity) {
		this.command = command;
		this.userID = userID;
		this.entity = entity;
	}
	
	public Object getEntity() {
		return entity;
	}

	public void setEntity(Object entity) {
		this.entity = entity;
	}

	public String getCondition() {
		return condition;
	}

	public void setCondition(String condition) {
		this.condition = condition;
	}

	public SERVER_COMMANDS getCommand() {
		return command;
	}

	public String getUserID() {
		return userID;
	}
	
	
	
	

}
